package com.sfy.example.consumer;

import com.sfy.core.example.proxy.ServiceProxyFactory;
import com.sfy.example.common.model.User;
import com.sfy.example.common.user.UserService;

public class ConsumerExample {
    public static void main(String[] args) {

        UserService userService = ServiceProxyFactory.getProxy(UserService.class);
        User user = new User();
        user.setName("sfy");
        User serviceUser = userService.getUser(user);
        if (serviceUser != null) {
            System.out.println(serviceUser.getName());
        }else {
            System.out.println("user is null");
        }

    }
}
